@import '../../../../themes/default.less';

.fade {
  &-enter,
  &-appear {
    display: none;
  }

  &-enter-active,
  &-appear-active {
    display: inline-block;
    transition: all 1s ease-in;
  }

  &-enter-done,
  &-appear-done {
    display: inline-block;
    transition: all 1s ease-in;
  }
}

.custom-tabs-item {
  position: relative;
  z-index: 0;
  display: inline-block;
  height: @tabs-height;
  margin: 0 2px;
  overflow: hidden;
  line-height: @tabs-height;
  background: @tab-bg;
  border-bottom: 0;
  cursor: pointer;
  user-select: none;
  &:hover {
    // font-weight: 700;
    background-color: #f8f8f8;
    :global {
      .tab-operate-wrapper {
        .icon {
          display: block;
        }
      }
    }
  }
  :global {
    .tab-top-line {
      position: absolute;
      top: 0;
      width: 100%;
      border: 2px solid @primary-color;
      border-radius: 3px 3px 0 0;
      transform: scaleX(0);
      transition: transform 0.5s;
    }

    /** 页签操作容器 */
    .tab-operate-wrapper {
      position: absolute;
      top: 50%;
      right: 5px;
      transform: translateY(-50%);
      .icon {
        display: none;
        margin: 10px 0;
        cursor: pointer;
        &:hover {
          font-weight: bolder;
          transform: scale(1.2, 1.2);
        }
      }
    }

    /** 页签标题样式 */
    .tab-title {
      position: relative;
      height: @tabs-height;
      overflow: hidden;
      white-space: nowrap;
      text-align: center;
      a {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        padding: 0 15px;
        overflow: hidden;
        color: @tab-title-color;
        font-size: 14px;
        text-overflow: ellipsis;
        &:hover {
          color: @tab-title-hover-color;
        }
      }
    }
  }
  &_active {
    z-index: 1000;
    font-weight: 700;
    background: @base-bg-color !important;
    :global {
      .tab-top-line {
        transform: scaleX(1);
        transform-origin: 0 0;
      }
      .tab-title {
        a {
          color: @tab-title-hover-color;
        }
      }
    }
  }
}

/** 包含多个页签项的信息样式 */
.custom-tabs-more {
  box-sizing: border-box;
  width: 160px;
  padding: 5px;
  background: @tab-bg;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  :global {
    .tabs-more-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 10px;
      &_active {
        background: #f2f5f7;
      }
      &:hover {
        background: #f2f5f7;
      }
      .title {
        width: 125px;
        padding: 5px 0;
        overflow: hidden;
        font-size: 12px;
        white-space: nowrap;
        text-overflow: ellipsis;
        cursor: pointer;
      }
      .icon {
        display: block;
        cursor: pointer;
        &:hover {
          font-weight: bolder;
          transform: scale(1.2, 1.2);
        }
      }
    }
  }
}
